package ar.com.vates.clasesYobjetos.ejercicio1;


public class Punto {

	private int atributo1;
	private int atributo2;
	
	public Punto(){
		atributo1 = 0;
		atributo2 = 0;
	}
	public Punto(int coorX,int coorY){
		this.atributo1 = coorX;
		this.atributo2 = coorY;
	}
	
	public int getAtributo1() {
		return this.atributo1;
	}
	public void setAtributo1(int atributo1) {
		this.atributo1 = atributo1;
	}
	public int getAtributo2() {
		return this.atributo2;
	}
	public void setAtributo2(int atributo2) {
		this.atributo2 = atributo2;
	}
	public double calcularDistancia(Punto punto){
		
		double distancia;
		
		distancia = Math.sqrt((Math.pow(punto.atributo1 - this.atributo1, 2)) + Math.pow(punto.atributo2 - this.atributo2, 2));
		return distancia;
	}
	
}
